﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAO;
using DTO;
using System.Data;
namespace BUS
{
    public class ChuyenBayBUS
    {
        
        public List<ChuyenBayDTO> GetCB()
        {
            ChuyenBayDAO dao = new ChuyenBayDAO();
            return dao.GetCB();
        }
        public ChuyenBayDTO layCt(string i)
        {
            ChuyenBayDAO dao = new ChuyenBayDAO();
            return dao.GetChitiet(i);
        }


        #region Ngo Minh Nhat - source code

        public int LayMaCB()
        {
            ChuyenBayDAO dao = new ChuyenBayDAO();
            return dao.LayMaCB();
        }

        public List<ChuyenBayDTO> TraCuuChuyenBay(int flag)
        {
            ChuyenBayDAO cbdao = new ChuyenBayDAO();
            return cbdao.TraCuuChuyenBay(flag);
        }

        public List<ChuyenBayDTO> TraCuuCBTheoYeuCau(ChuyenBayDTO cbdto, int flag)
        {
            ChuyenBayDAO cbdao = new ChuyenBayDAO();
            return cbdao.TraCuuCBTheoYeuCau(cbdto, flag);
        }

        public string KiemTraTuyenBay(string matb)
        {
            ChuyenBayDAO cbdao = new ChuyenBayDAO();
            return cbdao.KiemTraTuyenBay(matb);
        }

        public int KiemTraThoiGianBay()
        {
            ChuyenBayDAO cbdao = new ChuyenBayDAO();
            return cbdao.KiemTraThoiGianBay();
        }

        public int ThemChuyenBay(ChuyenBayDTO cbdto)
        {
            ChuyenBayDAO cbdao = new ChuyenBayDAO();
            return cbdao.ThemChuyenBay(cbdto);
        }
        #endregion
    }
}
